package com.example.anew.journey.mynewjourney.adpater;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.example.anew.journey.mynewjourney.factory.MainFragmentFactory;

import cn.jesse.nativelogger.NLogger;

/**
 * 杭州惟君医疗科技有限公司15
 * Created by 20433 on 2018/3/7
 */

public class MainViewpagerAdapter extends FragmentPagerAdapter {
    private String[] arr = new String[]{"设备","我"};
    public MainViewpagerAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int position) {
        NLogger.e("MainViewpagerAdapter===== "+position);
        return MainFragmentFactory.CreateCircleObject(position);
    }

    @Override
    public int getCount() {
        return arr.length;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return arr[position];
    }
}
